[USER (data scientist)]: That's a nice function! Can you also calculate the head-to-head record of Raonic M. against each of Federer's opponents? Please generate the code with the output in function type.
My template of code snippet is:

---BEGIN CODE TEMPLATE---

import pandas as pd
import numpy as np
import pickle
from decision_company import read_csv_file, fetch_column, logical_and, logical_or, create_dataframe, concatenate_objects, reset_index, search_where, extract_unique_values, update_dict, assert_series

# Load the dataset 
atp_tennis = read_csv_file('atp_tennis.csv')

# YOUR SOLUTION BEGIN:
<code1>
[GENERATE YOUR CODE] 
</code1>
# YOUR SOLUTION END

---END CODE TEMPLATE---

[YOU (AI assistant)]: Sure, let's add the head-to-head record calculation to the existing function: 

# MY SOLUTION BEGIN:
